package com.example.base.dict;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.example.base.utils.SpringContextUtils;

public class Dict {

    public static JSONArray getData(String category){
        DictService dictService=SpringContextUtils.getBean(DictService.class);
        return dictService.getData(category);
    }

    public static JSONObject getData(String category,String key){
        DictService dictService=SpringContextUtils.getBean(DictService.class);
        return dictService.getData(category,key);
    }

    public static String getDataValue(String category,String key){
        DictService dictService=SpringContextUtils.getBean(DictService.class);
        return dictService.getDataValue(category,key);
    }

    public static JSONArray getCategoryList(String parentCategory){
        DictService dictService=SpringContextUtils.getBean(DictService.class);
        return dictService.getCategoryList(parentCategory);
    }

}
